import { getCurrentInstance, defineComponent, ComponentInternalInstance } from "vue";
import "./alarm.scss";
import HistAlarmList from "./components/histAlarmList";
import RealAlarmList from "./components/realAlarmList";
export default defineComponent({
	emits: [],
	setup() {
		const { proxy } = getCurrentInstance() as ComponentInternalInstance;
		const state = reactive({
			viewType: "real"
		});
		return () => {
			return (
				<div class="page-alarm-list">
					<el-tabs v-model={state.viewType}>
						<el-tab-pane label={proxy?.$t("alarmlist.tab_pane.real")} name="real">
							{state.viewType == "real" ? <RealAlarmList /> : null}
						</el-tab-pane>
						<el-tab-pane label={proxy?.$t("alarmlist.tab_pane.hist")} name="hist">
							{state.viewType == "hist" ? <HistAlarmList /> : null}
						</el-tab-pane>
					</el-tabs>
				</div>
			);
		};
	}
});
